import {MAJOR} from '@/services/api'
import {request, METHOD} from '@/utils/request'

export async function listMajorByPage(currentPage, size) {
    return request(MAJOR, METHOD.GET, {
        currentPage: currentPage,
        size: size
    })
}

export async function totalMajor() {
    return request(MAJOR+"/total", METHOD.GET)
}

export async function deleteMajor(id) {
    return request(MAJOR, METHOD.DELETE, {
        id: id
    })
}

export async function editMajor(major) {
    return request(MAJOR, METHOD.POST, {
        id: major.id,
        name: major.name,
        collegeId: major.collegeId
    })
}
